import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Repository, createConnection } from 'typeorm';
//import { SharedModule } from '@/shared/shared.module';

//import { Files } from '@/entity/files/files.entity';
// import { UserModule } from '@/module/admin/user/user.module';
// import { FilesModule } from '@/module/common/files/files.module';
// import { AuthModule } from './module/auth/auth.module';
// import { CategoryModule } from './module/common/category/category.module';
// import { BusinessModule } from './module/admin/business/business.module';
// import { RedisBascModule } from './servers/redis/redisbasc.module';
// import { SetKeyModule } from './module/common/set-key/set-key.module';
import { HomeModule } from './module/home/home.module';
// import { HomeModule as AdminHomeModule } from './module/admin/home/home.module';



@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: '42.192.66.143',
      port: 3306,
      username: 'root',
      password: '123456',
      database: 'nestjs',
      autoLoadEntities: true,
      synchronize: true,
      entities: [],
      keepConnectionAlive: true
    }),
    //RedisBascModule,
    //TypeOrmModule.forFeature([Files]),
    //SharedModule,
    // UserModule,
    // FilesModule,
    // AuthModule,
    // CategoryModule,
    // BusinessModule,
    // SetKeyModule,
    HomeModule,
    // AdminHomeModule
  ],
  controllers: [AppController],
  providers: [
    AppService, 
    //Repository,
    //SharedModule
  ],
})
export class AppModule {}
